{% extends "product/base.html" %}{% load i18n %} {% block content %}
{% block title %}{% trans "Category List" %}{% endblock %}
<div>

	{% if user and categories %}
	<ol>
		{% ifequal categories.0.level 3 %} 
		{% for category in categories %}
		<li>
			<a href="/product/list/{{category.id}}/">{{ category.name }}</a>
		</li>
		{% endfor %}
		{% else %} 
		{% for category in categories %}
		<li>
			{% if category.url %}
			<a href="{{category.url}}">{{ category.name }}</a> {%else%}
			<a href="/product/category/sub/{{category.id}}/">{{ category.name }}</a> {%endif %}
		</li>
		{% endfor %} 
		<!-- level -->
		{% endifequal  %}
	</ol>
	{% endif %}
</div>
{% endblock %}
